import {Popover} from 'antd';
export const getStr=(str)=>{
    let result =''
    if(str&&str.length>15){
        result=str.slice(0,15)+"……"
    }else{
        result=str
    }
return <Popover content ={str}>{result}</Popover>;
}

export const getKey=(value,dataList)=>{
    // console.log(value,dataList)
    let result = ''
    let lists = dataList.filter(item=>item.value===value)
    if(value&&lists.length>0){
        result=lists[0].name
    }
    return result
}
export const getTitleDiv = title => {
    return (
        <div style={{ position: 'relative', color: 'black', fontSize: '20px', fontWeight: 600, margin: '20px 0' }}>
            <div style={{ position: 'absolute', width: '4px', height: '20px', backgroundColor: '#FAA458', margin: 'auto', top: '0', bottom: '0' }} />
            <div style={{ paddingLeft: '10px' }}>{title}</div>
        </div>
    );
};
